package Test;

import java.util.Random;

public class Test3 {
    public static void main(String[] args) {
        // 定义一个数组
        String b = "";
        char[] a = new char[52];
        //插入小写字母
        for (int i = 0; i < 26; i++) {
            a[i+26] = (char) (i + 97);
        }
        //插入大写字母
        for (int i =0;i < 26; i++){
            a[i] = (char)(i + 65);
        }
        Random r = new Random();
        //取四个随机字母
        for (int i = 0; i < 4; i++) {
            int index = r.nextInt(a.length);
            b += a[index];
        }
        //取一个随机数字
        int num = r.nextInt(10);
        b += num;
        System.out.println(b);
    }
}
